import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: dings
 * Date: 2024-05-21
 * Time: 20:05
 */
public class Test {
    public static void main(String[] args) throws CloneNotSupportedException {
        Student student1 = new Student("dings",18);
        Student student2 = (Student) student1.clone();
        student1.money.m = 9;
        System.out.println(student1.money.m);
        System.out.println(student2.money.m);
    }
    public static void main1(String[] args) {
        Student[] students = new Student[]{
                new Student("dings",18),
                new Student("perper",3),
                new Student("huahua",20)
        };
        System.out.println("before:"+Arrays.toString(students));
        AgeComparator ageComparator = new AgeComparator();
        NameComparator nameComparator = new NameComparator();
        Arrays.sort(students,nameComparator);
        System.out.println("after:"+Arrays.toString(students));
    }
}
